package svc

import (
	"1-8zy/api/internal/config"
	"1-8zy/rpc/shopclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	ShopRpc shopclient.Shop
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		ShopRpc: shopclient.NewShop(zrpc.MustNewClient(c.ShopRpc)),
	}
}
